package app.fugema.shop.main.order.adapter;

import com.base.common.view.adapter.connector.BaseItemMultiType;
import com.base.common.view.adapter.connector.BaseViewHolder;

import app.fugema.shop.R;
import app.fugema.shop.databinding.PaySuccessTitleBinding;
import app.fugema.shop.main.order.model.OrderPayResultBean;

public class PayResultTitleItemType extends BaseItemMultiType<OrderPayResultBean, PaySuccessTitleBinding>
{
    @Override
    public int getLayoutId()
    {
        return R.layout.pay_success_title;
    }

    @Override
    public int getItemViewType()
    {
        return TYPE_HEAD;
    }

    @Override
    public boolean isFullSpanType()
    {
        return true;
    }


    @Override
    public void onCreateViewHolder(PaySuccessTitleBinding binding, BaseViewHolder viewHolder) {
        super.onCreateViewHolder(binding, viewHolder);
    }


    @Override
    public void onBindViewHolder(PaySuccessTitleBinding binding, int position, BaseViewHolder viewHolder, OrderPayResultBean bean)
    {
        super.onBindViewHolder(binding, position, viewHolder, bean);

        switch ( bean.getStatus() )
        {
            case 0:
                binding.ivPayStatus.setImageResource( R.mipmap.ic_pay_success );
                break;
        }

        binding.tvPayMoney.setText( bean.getPaymoney() );

    }
}
